import java.util.Random;

public class Student {
    private long ID;
    private String name;
    private int chinese;
    private int math;
    private int english;
    private int physics;
    private int chemistry;
    private int grades;

    public long getID() {
        return ID;
    }

    public void setID(long ID) {
        this.ID = ID;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getChinese() {
        return chinese;
    }

    public void setChinese(int chinese) {
        this.chinese = chinese;
    }

    public int getMath() {
        return math;
    }

    public void setMath(int math) {
        this.math = math;
    }

    public int getEnglish() {
        return english;
    }

    public void setEnglish(int english) {
        this.english = english;
    }

    public int getPhysics() {
        return physics;
    }

    public void setPhysics(int physics) {
        this.physics = physics;
    }

    public int getChemistry() {
        return chemistry;
    }

    public void setChemistry(int chemistry) {
        this.chemistry = chemistry;
    }

    public int getGrades() {
        return grades;
    }

    public void setGrades(int grades) {
        this.grades = grades;
    }


    public void copyStudent(Student a, Student b) {
        a.setName(b.getName());
        a.setID(b.getID());
        a.setMath(b.getMath());
        a.setChinese(b.getChinese());
        a.setEnglish(b.getEnglish());
        a.setChemistry(b.getChemistry());
        a.setPhysics(b.getPhysics());
        a.setGrades(b.getGrades());
    }

    public double del(double a) {
        if (a > 100) a = 100;
        if (a < 50) a = 50;
        return a;
    }

    public void setStudent(long ID,String name) {

        Random ran = new Random();

        this.ID = ID;
        this.name = name;

        double a = ran.nextGaussian() * 10 + 75;
        del(a);
        this.chinese = (int) a;

        a = ran.nextGaussian() * 10 + 75;
        del(a);
        this.math = (int) a;

        a = ran.nextGaussian() * 10 + 75;
        del(a);
        this.english = (int) a;

        a = ran.nextGaussian() * 10 + 75;
        del(a);
        this.physics = (int) a;

        a = ran.nextGaussian() * 10 + 75;
        del(a);
        this.chemistry = (int) a;

        this.grades = chinese + math + english + physics + chemistry;
    }

    public void show() {
        System.out.println("语文成绩：" + chinese);
        System.out.println("数学成绩：" + math);
        System.out.println("英语成绩：" + english);
        System.out.println("物理成绩：" + physics);
        System.out.println("化学成绩：" + chemistry);
        System.out.println("总分：" + grades);
    }

}
